package com.jiyinit.web.core.video.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jiyinit.core.framework.base.paging.PagingResult;
import com.jiyinit.web.core.video.dao.TabCoreIconUserDao;
import com.jiyinit.web.core.video.dto.IconUserRequest;
import com.jiyinit.web.core.video.entity.TabCoreIconUserEntity;

@Service("core.iconUserServiceImpl")
public class IconUserServiceImpl {
	
	@Resource(name = "core.tabCoreIconUserDao")
	private TabCoreIconUserDao tabCoreIconUserDao;
	
	
	/**
     * 多条件分页查询
     * @param request
     * @return
     */
	public PagingResult<TabCoreIconUserEntity> findForPage(IconUserRequest request){
        return tabCoreIconUserDao.findForPage(request);
    }
	
	/**
	 * id查询
     * @param id
     * @return
     */
	public TabCoreIconUserEntity findOne(Integer id){
		return tabCoreIconUserDao.findOne(id);
	}
	
	/**
	 * 添加
     * @param entity
     * @return
     */
	public int add(TabCoreIconUserEntity entity){
		return tabCoreIconUserDao.add(entity);
	}
	
	/**
	 * 修改
     * @param entity
     * @return
     */
	public int update(TabCoreIconUserEntity entity){
		return tabCoreIconUserDao.update(entity);
	}
	
	/**
	 * 删除
     * @param id
     * @return
     */
	public int delete(Integer id){
		return tabCoreIconUserDao.delete(id);
	}

	/**
	 * userId修改
	 * @param entity
	 * @return
     */
	public int updateByUserId(TabCoreIconUserEntity entity){
		return tabCoreIconUserDao.updateByUserId(entity);
	}

	public List<String> findIconListByUserId(Integer userId){
		return tabCoreIconUserDao.findIconListByUserId(userId);
	}
	
}
